Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Openprompt polishing #8

Merged
merged 3 commits into from
Oct 26, 2024
Merged

Openprompt polishing #8

merged 3 commits into from
Oct 26, 2024

Conversation

akvlad
Copy link
Collaborator

@akvlad akvlad commented Oct 26, 2024

  • JSON object output:
select open_prompt('I want ice cream', json_schema := '{
       "type": "object",
       "properties": {
         "summary": { "type": "string" },
         "sentiment": { "type": "string", "enum": ["pos", "neg", "neutral"] }
       },
       "required": ["summary", "sentiment"],
       "additionalProperties": false
     }');
  • custom system prompt:
select open_prompt('I want ice cream.', system_prompt:='The respose MUST be a JSON with the following schema: {
           "type": "object",
           "properties": {
             "summary": { "type": "string" },
             "sentiment": { "type": "string", "enum": ["pos", "neg", "neutral"] }
           },
           "required": ["summary", "sentiment"],
           "additionalProperties": false
         }');

@lmangani lmangani merged commit e333d4e into main Oct 26, 2024
50 checks passed
@lmangani lmangani deleted the openprompt-polishing branch October 26, 2024 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants